namespace Grep.SharePoint.Lib.Extensions
{
    using System;
    using System.Web.UI.WebControls.WebParts;

    public static class WebPartCollectionExtensions
    {
        public static void ForEach(this WebPartCollection self, Action<WebPart> action)
        {
            foreach (WebPart wp in self)
            {
                action(wp);
            }
        }
    }
}